package com.enation.app.web.tag.navigation;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.enation.app.web.core.plugin.homepage.IShowPluginEvent;
import com.enation.framework.taglib.BaseFreeMarkerTag;

import freemarker.template.TemplateModelException;

/**
 * 
 * @function 首页显示导航html标签
 * @author 闯哥
 * @time 2016年11月13日 下午7:10:29
 */
@Component
public class ShowNavigationTag extends BaseFreeMarkerTag {

	@Autowired
	private IShowPluginEvent showNavigationPlugin;

	@Override
	protected Object exec(Map params) throws TemplateModelException {

		String val = params.get("state").toString();
		Integer state = Integer.parseInt(val);
		return showNavigationPlugin.onShow(state);
	}

}
